$tabs-threshold: 990px;

.LeaderboardHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.5rem 0;
}

.Leaderboard-Title {
  display: flex;
  justify-content: space-between;
  margin-top: 3rem;
  margin-bottom: 2rem;
}

.Leaderboard-Title h1 {
  margin: 0 0 1rem;
  display: flex;

  @media screen and (max-width: $tabs-threshold) {
    font-size: 2rem;
  }
}

.Leaderboard-Title img {
  margin-left: 1rem;
}

.Leaderboard-Title__description {
  color: rgb(183, 183, 189);
  line-height: 2.15rem;
}

.GlobalLeaderboards .LeaderboardContainer__competition-tabs .Tab {
  width: 40rem;
  margin: 0 auto;
  grid-auto-columns: minmax(0, 1fr);
  grid-auto-flow: column;
}

.LeaderboardContainer__competition-tabs {
  position: relative;
  display: flex;
  align-items: center;
}

@media screen and (max-width: 600px) {
  .GlobalLeaderboards .Tab {
    width: unset;
  }

  .GlobalLeaderboards .Tab-option {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .LeaderboardHeader {
    display: block;
  }

  .LeaderboardSearch.TopPositionsSearch {
    width: unset;
  }
}

.Table .formula {
  font-style: italic;
}

.TopPositionsItem {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.TopPositionsItem img,
.TopPositionsItem span {
  display: inline-block;
  margin-right: 0.5rem;
}

.LeaderboardSearch {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 30rem;
}

.TopPositionsPositionCell .Tooltip {
  display: inline-block;
  width: 100%;
}

.TopPositionsPositionCell .Tooltip-handle {
  display: inline-block;
  width: 100%;
}

.TopPositionsPositionView {
  display: inline-flex;
  align-items: center;
  width: 100%;
  text-decoration: inherit;
}

.TopPositionsPositionView .TopPositionsSymbol {
  display: inline-block;
  text-decoration: inherit;
}

.TopPositionsMarketName {
  margin-right: 0.5rem;
}

.TopPositionsDirection {
  margin-left: 0.5rem;
  text-align: left;
  width: 4.4rem;
}

.LeaderboardSearch.disabled {
  cursor: not-allowed;
}

.LeaderboardSearch:hover {
  background: var(--dark-blue-hover);
}

.LeaderboardSearch:active {
  background: var(--dark-blue-active);
}

.LeaderboardRank-1,
.LeaderboardRank-2,
.LeaderboardRank-3,
.LeaderboardRank-4 {
  display: inline-flex;
}

.LeaderboardRankRow-Pinned td:first-child::before {
  content: "";
  display: inline-block;
  width: 0.2rem;
  height: 100%;
  position: absolute;
  left: 0;
  top: 0;
  background-color: var(--color-cold-blue-500);
}

.LeaderboardRank-1::after,
.LeaderboardRank-2::after,
.LeaderboardRank-3::after,
.LeaderboardRank-4::after {
  content: "";
  width: 2.5rem;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  margin-left: 0.5rem;
  position: absolute;
  left: 31px;
  top: 10px;
  z-index: 111;
  height: 2.5rem;
}

.NoLiqPriceTooltip {
  min-width: 28rem;
  white-space: normal;
}

.LeaderboardRank-1::after {
  background-image: url(../../img/rank1.svg);
}

.LeaderboardRank-2::after {
  background-image: url(../../img/rank2.svg);
}

.LeaderboardRank-3::after {
  background-image: url(../../img/rank3.svg);
}

.LeaderboardRank-4::after {
  background-image: url(../../img/rank4.svg);
}

.CompetitionPrizes {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-bottom: 2rem;
  overflow-x: auto;

  &__prize {
    display: flex;
    width: 100%;

    &-container {
      flex: 1 1;
      margin-right: 1.8rem;
      margin-bottom: 1rem;
      background-color: var(--color-slate-800);
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-radius: 0.5rem;
      text-align: left;
      padding: 2rem 2rem;
      min-width: 21rem;
      display: flex;
      flex-direction: column;

      &:last-child {
        margin-right: 0;
      }
    }

    &-text {
      display: flex;
      flex-direction: column;
      white-space: nowrap;
      margin-left: 2rem;
      flex: 2;
      position: relative;
      top: 0.5rem;
    }

    &-icon-container {
      display: flex;
      flex: 1;
      text-align: center;
    }

    &-icon {
      position: relative;
      top: 0.1rem;
      width: 100%;
    }

    &-title {
      color: var(--color-gray-300);
      margin-bottom: 0.5rem;
      font-size: 1.5rem;

      @media screen and (max-width: 1100px) {
        font-size: 1.2rem;
      }
    }

    &-description {
      color: var(--color-white);
      margin-bottom: 1rem;
      white-space: nowrap;
      font-size: 2rem;

      @media screen and (max-width: 1100px) {
        font-size: 1.5rem;
      }
    }
  }

  &__prize-winners-container {
    display: flex;
    align-items: center;
    font-size: 1.4rem;
    user-select: none;
    margin-top: 1rem;
    justify-content: space-between;
    width: 100%;

    @media screen and (max-width: 1180px) {
      justify-content: center;
    }
  }

  &__prize-winners {
    display: flex;
    background: #222641;
    border-radius: 9999rem;
    padding: 0.3rem 1rem;
  }

  &__prize-winners-text {
    color: #ffffffb3;

    @media screen and (max-width: 1180px) {
      display: none;
    }
  }

  &__prize-winner {
    display: flex;
    align-items: center;

    &_many {
      margin-right: 0.5rem;

      &:last-child {
        margin-right: 0;
      }
    }
  }

  &__prize-rest {
    margin-left: 0.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
  }

  &__tooltip-winner &__prize-rest {
    margin-left: 1rem;
  }

  &__tooltip-winner {
    display: flex;
    text-decoration: none !important;
    margin-bottom: 1rem;
    color: white !important;

    &:last-child {
      margin-bottom: 0;
    }
  }

  &__prize-winner-tooltip .Tooltip-popup {
    min-width: 0 !important;
  }

  .Tooltip-handle {
    text-decoration: none;
    align-items: center;
    top: 0.2rem;
  }

  a {
    text-decoration: none;
    font-family: monospace;
  }
}

.CompetitionCountdown {
  &__time {
    color: var(--color-white);
  }
  &_desktop &__time {
    white-space: nowrap;
    font-size: 3rem;
    margin-left: 0.5rem;

    @media screen and (max-width: $tabs-threshold) {
      font-size: 2rem;
    }
  }

  &__end {
    display: flex;
    position: absolute;
    right: var(--default-container-padding);
    top: 1.8rem;

    @media screen and (max-width: 1000px) {
      position: static;
    }
  }

  &_desktop {
    position: absolute;
    right: 0;
    top: 0;

    color: var(--color-gray-300);
    white-space: nowrap;

    @media screen and (max-width: $tabs-threshold) {
      position: relative;
      text-align: center;
      margin-top: 2rem;
    }
  }

  &_mobile {
    display: block;
  }

  &_mobile::after {
    content: ".";
  }
}

.LeaderboardContainer__leaderboard-tabs {
  margin-bottom: 1rem;
  margin-top: 3rem;

  &_positions {
    visibility: hidden;
  }
}

.LeaderboardNavigation {
  display: flex;
  overflow-x: auto;
}

.LeaderboardHeader__network-icon {
  margin-left: 1rem;
  width: 1.7rem;
}

.LeaderboardNavigation .LeaderboardHeader__item {
  margin-right: 0.8rem;
  margin-bottom: 0.8rem;
  white-space: nowrap;

  &_selected {
    background: var(--color-slate-500) !important;
  }

  &:last-child {
    margin-right: 0;
  }
}

.Leaderboard__another-network {
  margin-top: 0.1rem;
}

.LeaderboardNavigation__chip {
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 999rem;
  font-size: 1.1rem;
  padding: 0.3rem 0.6rem;
  margin-right: 0.8rem;
  height: 2.2rem;

  &_soon {
    background-color: var(--color-blue-600);
  }

  &_over {
    background-color: rgb(180 187 255 / 10%);
  }

  &_live {
    background-color: #b42941;
    color: var(--color-white);
  }

  &-circle {
    background-color: var(--color-white);
    border-radius: 9999rem;
    width: 1.1rem;
    height: 1.1rem;
    display: inline-block;
    margin-right: 0.3rem;
  }
}

.TableBox {
  width: 100%;
  overflow: visible;
  background-color: var(--color-slate-800);
  padding-bottom: 10px;

  .text-right {
    text-align: right;
    padding-right: 2rem;
  }

  .Exchange-list-header .text-right {
    padding-right: 1.6rem;
  }
}

.TableBox table.Exchange-list.App-box.Table {
  border-radius: 0;
}

.TableBox__head {
  background-color: var(--color-slate-800);
  padding: 1rem 1.6rem;
  border-radius: 0.4rem 0.4rem 0 0;
  border-bottom: 1px solid var(--color-gray-900);
}

.TableBox__footer {
  background-color: var(--color-slate-800);
  padding: 1rem 1.6rem;
  border-radius: 0 0 0.4rem 0.4rem;
  border-top: 1px solid var(--color-gray-900);
  height: 5.8rem;

  & .pagination {
    margin-top: 0;
  }
}

.TableBox table.Exchange-list tr {
  border: none;
}

.TableBox table.Exchange-list tr:hover {
  cursor: default;
  box-shadow: none;
}

@media screen and (max-width: 1200px) {
  .TableBox {
    width: 100%;
    overflow-x: scroll;
    overflow-y: visible;
  }
  .Table {
    width: 1200px;
  }
}

table.Table.Exchange-list th {
  opacity: unset;
}

.TableHeader .TableHeaderTitle {
  opacity: 0.7;
  display: flex;
  height: 100%;
  white-space: nowrap;
  text-transform: uppercase;
  font-size: var(--font-base);
}
.TableHeader.text-right .TableHeaderTitle {
  justify-content: flex-end;
}

.TableHeader.sortable .TableHeaderTitle,
.TableHeader.sorted-asc .TableHeaderTitle,
.TableHeader.sorted-desc .TableHeaderTitle {
  cursor: pointer;
}

.TableHeader.sortable .TableHeaderTitle::after,
.TableHeader.sorted-asc .TableHeaderTitle::after,
.TableHeader.sorted-desc .TableHeaderTitle::after {
  content: "";
  display: inline-block;
  width: 1.5rem;
  margin-left: 0.5rem;
  background-repeat: no-repeat;
}

.TableHeader.sortable .TableHeaderTitle::after {
  background-position: center 0.25rem;
  background-image: url(../../img/ic_sortable.svg);
}

.TableHeader.sorted-asc .TableHeaderTitle::after {
  background-image: url(../../img/ic_sorted_asc.svg);
  background-position: center 0.5rem;
}

.TableHeader.sorted-desc .TableHeaderTitle::after {
  background-image: url(../../img/ic_sorted_desc.svg);
  background-position: center 0.4rem;
}

.Table_tr {
  position: relative;
}

.Table_tr td {
  z-index: 1;
  position: relative;
}

.Table-SizeTooltip .Tooltip-popup {
  min-width: 38rem !important;
  max-width: 38rem !important;
}
